package com.jk.smartelderlycare.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jk.smartelderlycare.dto.SysTution;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;

public interface SysTutionMapper extends BaseMapper<SysTution> {

    /**
     * @description: 机构列表后端分页查询
     * @param: [sysTution, page]
     * @return: com.baomidou.mybatisplus.core.metadata.IPage<com.jk.smartelderlycare.dto.SysTution>
     * @author hhk
     * @date: 2024/11/13 19:05
     */
    IPage<SysTution> findSysTutionPagimationList(@Param(value = "sysTution") SysTution sysTution, Page<SysTution> page);
    /**
     * @description: 新增中间表
     * @param: [map]
     * @return: void
     * @author hhk
     * @date: 2024/11/13 19:54
     */
    void addSysTutionAndLabel(HashMap<String, Object> map);
    /**
     * @description: 删除中间表
     * @param: [tutionId]
     * @return: void
     * @author hhk
     * @date: 2024/11/13 19:57
     */
    @Delete("delete from sys_tution_label where tution_id = #{tutionId}")
    void deleteSysTutionAndLabelByTutionId(Long tutionId);
    /**
     * @description: 根据id查询用户信息
     * @param: [tutionId]
     * @return: void
     * @author hhk
     * @date: 2024/11/13 19:59
     */
    SysTution findSysTutionByTutionId(Long tutionId);


}